<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>学生主页</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
    <style>
        body {
            background-color: #f8f9fa;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }
        .container {
            max-width: 600px;
            background-color: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
        h1 {
            margin-bottom: 20px;
            font-weight: 300;
            color: #343a40;
            font-size: 1.5rem;
            text-align: center;
        }
        .card {
            padding: 20px;
            border: none;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
        .form-label {
            font-weight: 500;
            color: #495057;
            font-size: 0.9rem;
            text-align: left;
            display: block;
        }
        .form-control {
            border-radius: 4px;
            font-size: 0.9rem;
            width: 100%;
            box-sizing: border-box;
        }
        .btn {
            background-color: #007bff;
            color: white;
            border-radius: 4px;
            width: 100%;
        }
        .btn:hover {
            background-color: #0056b3;
        }
        .alert-info {
            background-color: #cce5ff;
            color: #004085;
            border-color: #b8daff;
            font-size: 0.9rem;
            border-radius: 4px;
        }
    </style>
<form method="POST" action="{{ url_for('student_class', username=username, class_name=class_name) }}">
    <div class="form-group">
        <label for="exam_name">选择考试:</label>
        <select name="exam_name" class="form-control" id="exam_name">
            {% for exam in exams %}
            <option value="{{ exam.exam_name }}">{{ exam.exam_name }}</option>
            {% endfor %}
        </select>
    </div>
    <button type="submit" class="btn btn-primary">加入考试</button>
</form>
